namespace VAdvantage.Model
{

/** Generated Model - DO NOT CHANGE */
using System;
using System.Text;
using VAdvantage.DataBase;
using VAdvantage.Common;
using VAdvantage.Classes;
using VAdvantage.Process;
using VAdvantage.Model;
using VAdvantage.Utility;
using System.Data;
/** Generated Model for vss_vw_Rproductsearch
 *  @author Jagmohan Bhatt (generated) 
 *  @version Vienna Framework 1.1.1 - $Id$ */
public class X_vss_vw_Rproductsearch : PO
{
public X_vss_vw_Rproductsearch (Context ctx, int vss_vw_Rproductsearch_ID, String trxName) : base (ctx, vss_vw_Rproductsearch_ID, trxName)
{
/** if (vss_vw_Rproductsearch_ID == 0)
{
SetC_UOM_ID (0);
SetM_Product_Category_ID (0);
SetM_Product_ID (0);
SetPRODUCTCATEGORY (null);
SetProduct (null);
SetSEARCHKEY (null);
Setvss_vw_Rproductsearch_ID (0);
}
 */
}
public X_vss_vw_Rproductsearch (Ctx ctx, int vss_vw_Rproductsearch_ID, String trxName) : base (ctx, vss_vw_Rproductsearch_ID, trxName)
{
/** if (vss_vw_Rproductsearch_ID == 0)
{
SetC_UOM_ID (0);
SetM_Product_Category_ID (0);
SetM_Product_ID (0);
SetPRODUCTCATEGORY (null);
SetProduct (null);
SetSEARCHKEY (null);
Setvss_vw_Rproductsearch_ID (0);
}
 */
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_vss_vw_Rproductsearch (Context ctx, DataRow rs, String trxName) : base(ctx, rs, trxName)
{
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_vss_vw_Rproductsearch (Ctx ctx, DataRow rs, String trxName) : base(ctx, rs, trxName)
{
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_vss_vw_Rproductsearch (Ctx ctx, IDataReader dr, String trxName) : base(ctx, dr, trxName)
{
}
/** Static Constructor 
 Set Table ID By Table Name
 added by ->Harwinder */
static X_vss_vw_Rproductsearch()
{
 Table_ID = Get_Table_ID(Table_Name);
 model = new KeyNamePair(Table_ID,Table_Name);
}
/** Serial Version No */
static long serialVersionUID = 27563459105188L;
/** Last Updated Timestamp 8/9/2010 11:33:08 AM */
public static long updatedMS = 1281333788399L;
/** AD_Table_ID=1000111 */
public static int Table_ID;
 // =1000111;

/** TableName=vss_vw_Rproductsearch */
public static String Table_Name="vss_vw_Rproductsearch";

protected static KeyNamePair model;
protected Decimal accessLevel = new Decimal(3);
/** AccessLevel
@return 3 - Client - Org 
*/
protected override int Get_AccessLevel()
{
return Convert.ToInt32(accessLevel.ToString());
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected override POInfo InitPO (Context ctx)
{
POInfo poi = POInfo.GetPOInfo (ctx, Table_ID);
return poi;
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected override POInfo InitPO (Ctx ctx)
{
POInfo poi = POInfo.GetPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public override String ToString()
{
StringBuilder sb = new StringBuilder ("X_vss_vw_Rproductsearch[").Append(Get_ID()).Append("]");
return sb.ToString();
}
/** Set UOM.
@param C_UOM_ID Unit of Measure */
public void SetC_UOM_ID (int C_UOM_ID)
{
if (C_UOM_ID < 1) throw new ArgumentException ("C_UOM_ID is mandatory.");
Set_ValueNoCheck ("C_UOM_ID", C_UOM_ID);
}
/** Get UOM.
@return Unit of Measure */
public int GetC_UOM_ID() 
{
Object ii = Get_Value("C_UOM_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set Product Category.
@param M_Product_Category_ID Category of a Product */
public void SetM_Product_Category_ID (int M_Product_Category_ID)
{
if (M_Product_Category_ID < 1) throw new ArgumentException ("M_Product_Category_ID is mandatory.");
Set_ValueNoCheck ("M_Product_Category_ID", M_Product_Category_ID);
}
/** Get Product Category.
@return Category of a Product */
public int GetM_Product_Category_ID() 
{
Object ii = Get_Value("M_Product_Category_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set Product.
@param M_Product_ID Product, Service, Item */
public void SetM_Product_ID (int M_Product_ID)
{
if (M_Product_ID < 1) throw new ArgumentException ("M_Product_ID is mandatory.");
Set_ValueNoCheck ("M_Product_ID", M_Product_ID);
}
/** Get Product.
@return Product, Service, Item */
public int GetM_Product_ID() 
{
Object ii = Get_Value("M_Product_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set PRODUCTCATEGORY.
@param PRODUCTCATEGORY PRODUCTCATEGORY */
public void SetPRODUCTCATEGORY (String PRODUCTCATEGORY)
{
if (PRODUCTCATEGORY == null) throw new ArgumentException ("PRODUCTCATEGORY is mandatory.");
if (PRODUCTCATEGORY.Length > 60)
{
log.Warning("Length > 60 - truncated");
PRODUCTCATEGORY = PRODUCTCATEGORY.Substring(0,60);
}
Set_ValueNoCheck ("PRODUCTCATEGORY", PRODUCTCATEGORY);
}
/** Get PRODUCTCATEGORY.
@return PRODUCTCATEGORY */
public String GetPRODUCTCATEGORY() 
{
return (String)Get_Value("PRODUCTCATEGORY");
}
/** Set Product.
@param Product Product */
public void SetProduct (String Product)
{
if (Product == null) throw new ArgumentException ("Product is mandatory.");
if (Product.Length > 60)
{
log.Warning("Length > 60 - truncated");
Product = Product.Substring(0,60);
}
Set_ValueNoCheck ("Product", Product);
}
/** Get Product.
@return Product */
public String GetProduct() 
{
return (String)Get_Value("Product");
}
/** Set SEARCHKEY.
@param SEARCHKEY SEARCHKEY */
public void SetSEARCHKEY (String SEARCHKEY)
{
if (SEARCHKEY == null) throw new ArgumentException ("SEARCHKEY is mandatory.");
if (SEARCHKEY.Length > 40)
{
log.Warning("Length > 40 - truncated");
SEARCHKEY = SEARCHKEY.Substring(0,40);
}
Set_ValueNoCheck ("SEARCHKEY", SEARCHKEY);
}
/** Get SEARCHKEY.
@return SEARCHKEY */
public String GetSEARCHKEY() 
{
return (String)Get_Value("SEARCHKEY");
}
/** Set SKU.
@param SKU Stock Keeping Unit */
public void SetSKU (String SKU)
{
if (SKU != null && SKU.Length > 30)
{
log.Warning("Length > 30 - truncated");
SKU = SKU.Substring(0,30);
}
Set_ValueNoCheck ("SKU", SKU);
}
/** Get SKU.
@return Stock Keeping Unit */
public String GetSKU() 
{
return (String)Get_Value("SKU");
}
/** Set UOM.
@param UOM UOM */
public void SetUOM (String UOM)
{
if (UOM != null && UOM.Length > 10)
{
log.Warning("Length > 10 - truncated");
UOM = UOM.Substring(0,10);
}
Set_ValueNoCheck ("UOM", UOM);
}
/** Get UOM.
@return UOM */
public String GetUOM() 
{
return (String)Get_Value("UOM");
}
/** Set UPC/EAN.
@param UPC Bar Code (Universal Product Code or its superset European Article Number) */
public void SetUPC (String UPC)
{
if (UPC != null && UPC.Length > 30)
{
log.Warning("Length > 30 - truncated");
UPC = UPC.Substring(0,30);
}
Set_ValueNoCheck ("UPC", UPC);
}
/** Get UPC/EAN.
@return Bar Code (Universal Product Code or its superset European Article Number) */
public String GetUPC() 
{
return (String)Get_Value("UPC");
}
/** Set vss_vw_Rproductsearch_ID.
@param vss_vw_Rproductsearch_ID vss_vw_Rproductsearch_ID */
public void Setvss_vw_Rproductsearch_ID (int vss_vw_Rproductsearch_ID)
{
if (vss_vw_Rproductsearch_ID < 1) throw new ArgumentException ("vss_vw_Rproductsearch_ID is mandatory.");
Set_ValueNoCheck ("vss_vw_Rproductsearch_ID", vss_vw_Rproductsearch_ID);
}
/** Get vss_vw_Rproductsearch_ID.
@return vss_vw_Rproductsearch_ID */
public int Getvss_vw_Rproductsearch_ID() 
{
Object ii = Get_Value("vss_vw_Rproductsearch_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
}

}
